﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TjZheng.Power.DataEntity;

namespace TjZheng.Power.Business
{
    public partial class BizGroupInfo
    {
        public List<GroupInfo> ConvertToGroupInfoList(DataTable objDataTable)
        {
            return objDataTable.Select().Select(c => ConvertToGroupInfo(c)).ToList();
        }

        public GroupInfo ConvertToGroupInfo(DataRow objDataRow)
        {
            GroupInfo model = new GroupInfo();
            model.Id = (long)objDataRow["Id"];
            model.GroupName = (string)objDataRow["GroupName"];
            model.GroupCode = (string)objDataRow["GroupCode"];
            model.Description = (string)objDataRow["Description"];
            model.CreateDate = (DateTime)objDataRow["CreateDate"];
            return model;
        }
    }
}
